#写文件
# file_object=open("info.txt","wb")
# file_object.write("小峰".encode("utf-8"))
# file_object.close()
import random

# file_object = open("info.txt","wt",encoding="utf-8")
# file_object.write("小峰")
# file_object.close()


#案例：实现用户的注册
# file_object = open("info.txt","at",encoding="utf-8")
# while True:
#     user=input("输入用户名：")
#     if user.upper()=="Q":
#         break
#     pwd=input("输入密码：")
#     data="{}-{}\n".format(user,pwd)
#     file_object.write(data)
# file_object.close()



# with open("test.txt","rt",encoding="utf-8") as file_object:
#     f = file_object.tell()
#     print(f)
#     print(file_object.read())
#     file_object.seek(3)
#     print(file_object.read())


#函数的定义
# def info():
#     for i in range(1,4):
#         print(i)
# info()

def mycard():
    card_color_list=["红桃","方片","梅花","方片"]
    card_num=["1","2","3","4","5","6","7","8","9","J","Q","K","A"]
    #推导式
    card=[f"{color}{num}"for color in card_color_list for num in card_num]
    card.append("大王")
    card.append("小王")
    return card
cout=0
for i in mycard():
    print(i)
    cout+=1
print(cout)